package com.ice.dockerredis.config;

import java.util.ArrayList;
import java.util.List;

/**
 * @author icewinters
 */
public class SubList {

    private String subNum;

    private List<Item> items;


    public void addItem(Item item) {

        if (this.items == null) {
            synchronized (this) {
                if (this.items == null) {
                    this.items = new ArrayList<>();
                }
            }
        }

        this.items.add(item);
    }


    public String getSubNum() {
        return subNum;
    }

    public void setSubNum(String subNum) {
        this.subNum = subNum;
    }

    public List<Item> getItems() {
        return items;
    }

    public void setItems(List<Item> items) {
        this.items = items;
    }
}
